#include "const/oPreDefine.h"

void oGetPosFromStr( const char* str, float& x, float& y )
{
	char temp[64];
	strcpy(temp, str);
	char* token = strtok(temp, ",");
	x = (float)atof(token);
	token = strtok(nullptr, ",");
	y = (float)atof(token);
}

size_t oFNVHash( const char* str )
{
	size_t hash = 2166136261u;
	for (unsigned char *s = (unsigned char *)str;*s;s++)
	{
		hash = hash ^ ((size_t)*s) * 16777619u;
	}
    return hash;
}

size_t oFNVHash( const string& str )
{
	return oFNVHash(str.c_str());
}
